<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>flex布局</title>
    <style>
        html {
            height: 100vh;
            display: flex;
            justify-content: center;
            /* 水平 */
            align-items: center;
            /* 垂直 */
        }

        .wp {
            background: green;
        }
    </style>
</head>

<body>
    <div class="wp">123123</div>
</body>

</html>